package me.yobol.lintcode.easy.deletenode;

import me.yobol.lintcode.ListNode;

/**
 *
 * @author Yobol
 */
public class DeleteNode implements IDeleteNode{
    
    /**
     * @param node 
     */
    @Override
    public void deleteNode(ListNode node) {
        if (node == null) {
            return ;
        }
        System.out.println("Delete Node " + node.val);
        node.val = node.next.val;
        node.next = node.next.next;
    }
    
}
